<script>
export default {
	onLaunch: function() {
		console.log('App Launch');
	},
	onShow: async function() {
		console.log('App Show');
		const user = uni.getStorageSync('user');
		if (user) {
			uni.reLaunch({
				url: '/pages/chat/msgList/msgList'
			});
			await this.$socket.close();
			await this.$socket.connets();
			await this.$socket.sendMsg('user_login', {
				name: user
			});
		}
	},
	onHide: function() {
		console.log('App Hide');
	}
};
</script>

<style>
/*每个页面公共css */
</style>
